<style>
  .head-container{
    padding: 10px 0 14px;
    margin-bottom: 15px;
    border-bottom: 1px solid #E3E3E5;
  }
  .head-container .mes{
    margin-right: 10px;
    float: left;
  }
  .head-container .mes p{
    font-size: 12px;
    color:#CFCFCF;
    margin-bottom: 6px;
  }
  .head-container .mes input{
    width: 220px;
    height: 34px;
  }
  .head-container .flow{
    float: left;
    margin-right: 10px;
  }
  .head-container .flow p{
    font-size: 12px;
    color:#CFCFCF;
    margin-bottom: 6px;
  }
  .head-container .flow .flow-select{
    width: 140px;
    height: 34px;
  }
  .head-container .button-group{
    padding-top: 23px;
  }
  .price-result-wrap .price-content:last-child{
    border-bottom: none;
  }
</style>

<div id="priceList" class="pl-24 pr-24">
  <hl-page-header title="底价管理">
    <hl-button type="outline" @on-click="newAddprice" v-if="quanxian.indexOf('c84') > -1">新增底价</hl-button>
  </hl-page-header>

  <div class="head-container clearfix">
    <div class="flow">
      <p>项目</p>
			<hl-select :data="project" v-model="projectId" width="220" @on-change="getGroupPrimaryData"></hl-select>
    </div>
    <div class="flow">
      <p>组合</p>
      <hl-cascader :selected="selectedGroupData" :width="260" :primary-data="groupOneData" :secondary-data="groupTwoData" :tertiary-data="groupThreeData" @on-primary-change="selectOneGroup" @on-secondary-change="selectTwoGroup" @on-tertiary-change="selectThreeGroup"></hl-cascader>
    </div>
    <div class="flow">
      <p>楼栋</p>
			<hl-select :data="building" v-model="buildingId" width="220" @on-change="selectedBuilding"></hl-select>
    </div>

    <div class="button-group">
      <hl-button @on-click="search" size="mini">查询</hl-button>
      <hl-button @on-click="reset" size="mini">重置</hl-button>
    </div>
  </div>

  <div class="price-result-wrap br-4 global_table" style="border:1px solid #E5E5E5;">
    <ul class="clearfix border-b global_table_title">
      <li class="price-css-w-1">序</li>
      <li class="price-css-w-2">项目名称</li>
      <li class="price-css-w-3">楼宇名称</li>
      <li class="price-css-w-4">创建人</li>
      <li class="price-css-w-5">创建时间</li>
      <li class="price-css-w-6">状态</li>
      <li class="price-css-w-7 border-l">操作</li>
    </ul>

    <div>
      <ul class="clearfix price-content global_table_item" v-for="(item,index) in priceData.policys" :id="item.id">
        <li class="price-css-w-1">{{index + 1 < 10 ? '0' + (index + 1) : index + 1 }}</li>
        <li class="price-css-w-2">{{item.projectName}}</li>
        <li class="price-css-w-3">{{item.buildingName | formatUndefined}}</li>
        <li class="price-css-w-4">{{item.operatorName}}</li>
        <li class="price-css-w-5">{{item.createTime | formatDate}}</li>
        <li class="price-css-w-6">{{item.valid === 'Y' ? '启用' : '停用'}}</li>
        <li class="price-css-w-7 border-l">
          <button class="js-state"  @click="updateState(item.valid,item.id,index)" v-if="quanxian.indexOf('c85') > -1 && item.valid == 'Y'">停用</button>
          <button class="js-state"  @click="updateState(item.valid,item.id,index)" v-if="quanxian.indexOf('c86') > -1 && item.valid == 'N'">启用</button>
          <button class="js-edit"  @click="editUserMes(item.projectName,item.buildingName,item.buildingId)" v-if="quanxian.indexOf('c87') > -1">编辑</button>
        </li>
      </ul>
    </div>
  </div>

  <div class="js-show-title hide br-4"></div>

  <div class="user-page ptb-10 clearfix">
    <div class="pull-left user-page-num">
      <span class="font-14">共<i>{{priceData.totalCount}}</i>条记录</span>
      <span>每页<hl-select :data="pageNums" v-model="limit" width="80" @on-change="turnPage"></hl-select>条</span>
  </div>
  <div class="pull-right">
    <hl-pagination v-model="currentPage" :total="totalPage" @change="getSearchUserData"></hl-pagination>
  </div>
</div>
</div>

<script src="modules/price/scripts/price_list.js" charset="utf-8"></script>
